package com.ljfresh.customer.result;

import com.ljfresh.customer.page.PageResult;
import com.ljfresh.customer.exception.ErrorMap;
import com.ljfresh.customer.pojo.Store;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author: Lucifer
 * @time: 2020/4/8-9:42
 */
@ApiModel("门店列表返回类")
@Data
@NoArgsConstructor
public class StoreListResult extends Result {
    @ApiModelProperty()
    private PageResult<Store> data;

    public StoreListResult(Integer code){
        this.code = code;
        this.message = ErrorMap.map.get(code);
    }

    public StoreListResult(PageResult<Store> list){
        this.code = 0;
        this.message = "请求成功！";
        this.data=list;
    }
}
